var tempObj = null;
var tempImg = null;
var bttObj = null;
var tempID = null;
try{
jQuery(function(){
	tempObj = document.getElementById("cate_brandT");
	tempImg = document.getElementById("img_brandT");
	bttObj = document.getElementById("btt_brandT");
	tempID = 'brandT';
})
}catch(e){}
function IndexDeploy(ID, type) {
	obj = document.getElementById("cate_" + ID);
	img = document.getElementById("img_" + ID);
	var btt;
	try{
		btt = document.getElementById("btt_" + ID);
	}catch(e){}
	if (obj.style.display == "none") {
		obj.style.display = "";
		img_re = new RegExp("_open\\.gif$");
		img.src = img.src.replace(img_re, '_fold.gif');
		if(type==1){
			btt.style.display = "none";	
		}
		if(null != tempObj&&tempObj!=obj&&type==1){
			bttObj.style.display = "";
			tempObj.style.display = "none";
			img_re = new RegExp("_fold\\.gif$");
			if(type == 1){
					jQuery('#dddd_'+tempID).height(jQuery(bttObj).height()+2);
			}
		}
		tempObj = obj;
		tempImg = img;
		bttObj = btt;
		tempID = ID;
//		if(type==1){
//			window.location.hash = "tag_"+ID;	
//		}
		if(type == 1){
				parent.initIframeHeight(getHeight('cate_'+ID)+parseInt($("#hhh").val()));
				jQuery('#dddd_'+ID).height(jQuery(obj).height()+2);
		}
	} else {
		obj.style.display = "none";
		if(type==1){
			btt.style.display = "";	
		}
		img_re = new RegExp("_fold\\.gif$");
		img.src = img.src.replace(img_re, '_open.gif');
	}
	return false;
}

function pageHeight() {
	if (jQuery.browser.msie) {
		return document.compatMode == "CSS1Compat"
				? document.documentElement.clientHeight
				: document.body.clientHeight;
	} else {
		return self.innerHeight;
	}
};

function getHeight(id){
	return jQuery('#'+id).height();
}

function getPageHeight(){
	var documentHeight = 0;
	if(jQuery("body").innerHeight()>document.documentElement.clientHeight)
		documentHeight = jQuery("body").innerHeight();
	else
		documentHeight = document.documentElement.clientHeight;
	var documentWidth = 0;
	if(jQuery("body").innerWidth()>document.documentElement.clientWidth)
		documentWidth = jQuery("body").innerWidth();
	else
		documentWidth = document.documentElement.clientWidth;
	return documentHeight;
	
}